﻿@model IEnumerable<OAWeb.Models.Grade>

@{
    ViewBag.Title = "分数段统计";
}


<h1>分数段统计</h1>
<table border="1" height="300" style="text-align:center">
    @{
        <tr>
            <td width="150" height="50">科目\班级</td>
            <td width="150" height="50">分数段</td>

            @for (int i = 0; i < ViewBag.teachingClasses.Length; i++)
            {
                <td width="150" height="50">@ViewBag.teachingClasses[i].ClassName</td>
            }
            <td width="150" height="50">全年级</td>

        </tr>

        int l = -1;
        for (int c = 0; c < ViewBag.cours.Length; c++)
        {

            <tr>
                <td>
                    @ViewBag.cours[c].Subject

                </td>
                <td colspan="@(ViewBag.teachingClasses.Length + 2)" style="border-right:hidden">
                    <table style="border-collapse:collapse;border-top:hidden;border-left:hidden;text-align:center;" border="1" height="150">
                        @{
                            int jishu = 0;

                            for (int k = 0; k < 5; k++)
                            {
                                int count = 0;
                                l++;
                                <tr>
                                    @if (k != 4)
                                    {
                                        <td width="150">>=@(90 - jishu)</td>
                                    }
                                    @if (k == 4)
                                    {
                                        <td width="150">< 60</td>
                                    }
                                    @for (int i = 0; i < ViewBag.teachingClasses.Length; i++)
                                    {

                                        <td width="150">
                                            @ViewBag.count[(i * (ViewBag.cours.Length * 5)) + l]
                                        </td>
                                        count += ViewBag.count[(i * (ViewBag.cours.Length * 5)) + l];
                                    }
                                    <td width="150">@count</td>


                                </tr>
                                jishu += 10;
                            }

                        }

                    </table>
                </td>

            </tr>
        }







    }

</table>

@{


    @Html.ActionLink("查看统计图", "ScoreBar",new { id = Model.ToArray()[0].ExamID });
}